<template>
  <div class="home-main">
    <type-nave></type-nave>
    <list-container></list-container>
    <home-recommend></home-recommend>
    <Rank></Rank>
    <Link></Link>
    <Floor v-for="(floor,index) in refFloor" :key="floor.id" :list="floor"></Floor>
    <Brand></Brand>
  </div>
</template>

<script>
import TypeNave from '@/components/typenav/TypeNave'
import ListContainer from '@/views/home/listcontainer/ListContainer'
import HomeRecommend from '@/views/home/recommend/HomeRecommend'
import Rank from '@/views/home/rank/Rank'
import Link from '@/views/home/link/Link'
import Floor from '@/views/home/floor/Floor'
import Brand from '@/views/home/brand/Brand'
import {mapState} from 'vuex'
export default {
  name: 'HomeMain',
  components:{
    TypeNave,
    ListContainer,
    HomeRecommend,
    Rank,
    Link,
    Floor,
    Brand
  },
   mounted(){
     this.$store.dispatch('getreqFloorList')
  },
  computed:{
    //把数据从仓库中取出
    ...mapState({
      refFloor:state=>state.home.refFloor
    })
  }
}
</script>

<style lang="less">

</style>